// import ajax from '../ajax'
import request from '@/utils/request'

// 获取一级分类
// export const getCategory1ListApi = () => ({ url: '/admin/product/getCategory1', method: 'get' })
export const getCategory1ListApi = () => {
  return request.get('/admin/product/getCategory1')
}

// 获取二级分类
// export const getCategory2ListApi = (category1Id) => ajax({ url: `/admin/product/getCategory2/${category1Id}`, method: 'get' })
export const getCategory2ListApi = (category1Id) => {
  return request.get(`/admin/product/getCategory2/${category1Id}`)
}

// 获取三级分类
// export const getCategory3ListApi = (category2Id) => ajax({ url: `/admin/product/getCategory2/${category2Id}`, method: 'get' })
export const getCategory3ListApi = (category2Id) => {
  return request.get(`/admin/product/getCategory3/${category2Id}`)
}
